package com.yellowpage.ca.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * UserUsergroup entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CA_USER_USERGROUP")
public class UserUsergroup implements java.io.Serializable {

	// Fields

	private Long userUsergroupId;
	private Long userId;
	private Long userGroupId;
	private Long createUser;
	private Date createTime;

	// Constructors

	/** default constructor */
	public UserUsergroup() {
	}

	/** full constructor */
	public UserUsergroup(Long userId, Long userGroupId, Long createUser,
			Date createTime) {
		this.userId = userId;
		this.userGroupId = userGroupId;
		this.createUser = createUser;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "USER_USERGROUP_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getUserUsergroupId() {
		return this.userUsergroupId;
	}

	public void setUserUsergroupId(Long userUsergroupId) {
		this.userUsergroupId = userUsergroupId;
	}

	@Column(name = "USER_ID", precision = 18, scale = 0)
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "USER_GROUP_ID", precision = 18, scale = 0)
	public Long getUserGroupId() {
		return this.userGroupId;
	}

	public void setUserGroupId(Long userGroupId) {
		this.userGroupId = userGroupId;
	}

	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}